<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%><%@include file="Base.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
		<link rel="stylesheet" type="text/css" href="../../static/css/myCss/font-1.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/myCss/font-2.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/myCss/font-3.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/myCss/font-4.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/myCss/main.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/plugins/select/select2.min.css" />
		<!--<link rel="stylesheet" type="text/css" href="../../static/css/plugins/bootstrap-table/bootstrap-table.min.css" />-->

    		<script src="../../static/js/jquery.min.js" ></script>
    		<script src="../../static/js/plugins/slimscroll/jquery.slimscroll.min.js" ></script>
    		<script src="../../static/js/plugins/layer/layer.js" ></script>
    		<!-- <script src="../../static/js/plugins/select/select2.min.js" ></script> -->
    		<script src="../../static/js/plugins/select/select2.full.min.js" ></script>
		<script src="../../static/js/bootstrap.min.js"></script>
		<script src="../../static/js/plugins/bootstrap-table/bootstrap-table.js"></script>
	    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
	    <script src="../../libs/vue.min.js"></script>
	    <script src="../../js/common.js"></script>		  	
    		<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
</head>
<body>
<div id="firMasker">
	<div class="modal-w850 modal hidden" id="addCustomer" avalonctrl="addCustomer">
	<div class="modal-header">
		<h4 class="modal-title">报名管理</h4>
	</div>
	<div class="modal-body scroll" style="min-height: 600px;">
		<ul class="nav nav-tabs" style="border-bottom: 1px solid #D4D6D6;">
			<li class="active"><a>基本信息</a>
			</li>
			
		</ul>
		<style type="text/css">
			#addCustomer .label-sm{
				width: 90px;
			}
		</style>
		<div class="customerInfo form-horizontal" style="margin-top: 10px;">
			<div style="width: 100%;">
				<div class="form-group col-sm-4">
					<!--<span class="necessary">*</span>-->
					<label class="label-sm"><span class="icon-necessary"></span>姓  名：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid="required" name="StudentName">
						</div>
					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">性  别：</label>
					<div class="input-group">
						<div class="input-group-content">
							<select class="form-control input-sm" id="sexlist" style="width:150px;height:25px;" onclick="codeSelect(this);" >

							  <option>请选择</option>
							</select>
						</div>
					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">出生日期：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control triggerChooseDate" data-valid="">
						</div>
					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">身份证号：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid="">
						</div>
					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm"><span class="icon-necessary"></span>手机号码：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control customerTel" data-valid="phone">
						</div>

					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">QQ号码：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid="">
						</div>

					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">就读学校：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" id="customerManage_school" data-valid="" data-autocom="646458511473611">
						</div>

					</div>
				</div>
				
				<div class="form-group col-sm-4">
					<label class="label-sm">就读年级：</label>
					<div class="input-group">
						<div class="input-group-content">
							<select class="form-control input-sm" id="gradelist" style="width:150px;height:25px;" onclick="codeSelect(this);" >

							  <option>请选择</option>
							</select>
						</div>
					</div>
				</div>				
				

				<div class="form-group col-sm-4">
					<label class="label-sm">班  级：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid="">
						</div>

					</div>
				</div>
				<div class="clearfix"></div>
			</div>
			<div style="width: 100%;margin-top: 16px;">
				<div class="form-group col-sm-4">
					<label class="label-sm">监护人姓名：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid=""> 
						</div>

					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">监护人电话：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control cusOtherTel" >
						</div>

					</div>
				</div>
				<div class="form-group col-sm-4">
					<label class="label-sm">监护人职业：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control cusOtherTel" >
						</div>
					</div>
				</div>

				<div class="form-group col-sm-8">
					<label class="label-sm">家庭住址：</label>
					<div class="input-group">
						<div class="input-group-content">
							<input type="text" class="form-control" data-valid="">
						</div>

					</div>
				</div>
			</div>
			
			<div style="width: 100%;margin-top: 16px;" class="clearfix">
				
				<div class="form-group col-sm-4">
					<label class="label-sm">学生来源：</label>
					<div class="input-group">
						<div class="input-group-content">
							<select class="form-control input-sm" id="sourcelist" style="width:150px;height:25px;" onclick="codeSelect(this);" >

							  <option>请选择</option>
							</select>
							
							
						</div>
					</div>
				</div>
				
				<div class="col-sm-12">
					<div class="form-group col-sm-4">
						<label class="label-sm">所属校区：</label>
						<div class="input-group">
							<div class="input-group-content">
								
								 <select id="schoollist" class="form-control" style="width:150px;height:25px;" onclick="codeSelect(this);">
								      <option value="" selected="selected">请选择</option>
								 </select>
							</div>
						</div>
					</div>
					<div class="form-group col-sm-4">
						<label class="label-sm">介绍人：</label>
						<div class="input-group-content input-delete">
							<input type="text" placeholder="点击选择介绍人" class="form-control cursor_p" readonly="readonly" style="width: 148px;" data-valid="">
							<i style="height: 25px; display: none;"></i>
							<div class="input-group-addon">
								<i class="md md-empty16"></i>
							</div>
						</div>
					</div>
					
					<div class="form-group col-sm-4">
						<label class="label-sm">责任人：</label>
						<div class="input-group-content input-delete">
							<input style="width:148px;" type="text" placeholder="点击选择主责任人" class="form-control cursor_p" readonly="readonly" data-valid="">
							<i style="height: 25px; display: block;"></i>
						</div>
					</div>					
					
				</div>
				


				<!--结束-->
				
				<style type="text/css">
					#addCustomer .checkgroup{
						padding-bottom: 10px;
					}
					#addCustomer .checkgroup input[type=checkbox]{
						position: absolute;
						opacity: 0;
						z-index: -1;
					}
					#addCustomer .checkgroup label.dcell{
					    text-align: center;
					   	position: relative;
					}
					#addCustomer .checkgroup label.dcell>.checkgroup-label{
						padding: 2px 12px;
						cursor: pointer;
						border-right: 1px solid rgba(204,204,204,0.4);
						-webkit-user-select: none;
						-moz-user-select: none;
						-ms-user-select: none;
						user-select: none;
					}
					#addCustomer .checkgroup label.dcell:last-child>.checkgroup-label{
						border-right:none;
					}
					#addCustomer .checkgroup .dtable{
						border: 1px solid #ccc;
						border-radius: 2px;
						float: left;
					}
					#addCustomer .checkgroup input[type=checkbox]:checked + .checkgroup-label{
						background: #e3f0f4;
						    color: #356fbe;
					}
				</style>
				<div class="form-group col-sm-12 checkgroup">
					<label class="pull-left icon-jiaobiao" style="margin-right: 15px;">试听预约时间：<i class="icon-describe-top" describe="选中的方块代表预约的星期和时间，点击可以修改。"></i></label>
					<div class="dtable">
						<label class="dcell">
							<input type="checkbox" value="1">
							<div class="checkgroup-label">一</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="2">
							<div class="checkgroup-label">二</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="3">
							<div class="checkgroup-label">三</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="4">
							<div class="checkgroup-label">四</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="5">
							<div class="checkgroup-label">五</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="6">
							<div class="checkgroup-label">六</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="7">
							<div class="checkgroup-label">日</div>
						</label>
					</div>
					<div class="dtable" style="margin-left: 10px;">
						<label class="dcell">
							<input type="checkbox" value="8">
							<div class="checkgroup-label">上午</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="9">
							<div class="checkgroup-label">下午</div>
						</label>
						<label class="dcell">
							<input type="checkbox" value="10">
							<div class="checkgroup-label">晚上</div>
						</label>
					</div>
				</div>
				<div class="clearfix"></div>
			</div>
			
			<div class="form-group col-sm-12" id="zuobiao">
				
					<table class="table table-striped table-hover" id="shiftclassadd"
               data-toggle="table"
               data-toolbar="#toolbar"
               data-editable="true"
               data-unique-id="id"              
               >
						<thead>
							<tr>
								<th class="text-left" data-field="id" >序号</th>
								<th class="text-left" data-field="classid" >意向课程</th>
								<th class="text-left" data-field="gradeid" >意向班级</th>
								<th width="150px" class="text-left" data-field="schoolid">意向课程所属校区</th>
								<th width="50px" data-field="operate" >操作</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
						<tfoot>
							<tr>
								<td><a class="operation-link" onclick="addRowNum();">添加...</a></td>
							</tr>							
						</tfoot>
					</table>
			</div>
			<div class="form-group col-sm-12">
				<label class="label-sm">备  注：</label>
				<div class="col-sm-11" style="width: 700px;">
					<input type="text" class="form-control" maxlength="200">
				</div>
			</div>
			
		</div>
		<div class="section-body" style="display: none; width: 100%;"></div>
	</div>
	
	<div class="modal-footer">
		<button class="btn btn-success" onclick='saveClick();'>确定</button>
		<button class="btn btn-default" onclick='goback()'>取消</button>
	</div>
</div></div>
</body>

<script type="text/javascript">
	
	var $table = $('#shiftclassadd');

 	function addRowNum() {
				
		var tIndex = $table.bootstrapTable('getData').length;

 		$table.bootstrapTable('insertRow', {
		    index: tIndex,
		    row: {
				id : tIndex,
		        classid: "<select class='form-control input-sm' name='classlist' id='class_"+tIndex+"' style='width:150px;height:25px;' onclick='codeSelect(this);' onchange='afterSelectClick(this,"+tIndex+");'><option value='' selected='selected'>请选择课程</option></select>",
				gradeid: "<input type='text' class='form-control' name='gradelist' id='grade_"+tIndex+"' > ",
		        schoolid: "<input type='text' class='form-control' name='schoollist' id='school_"+tIndex+"' > ",
		        operate: "<button onclick='delRow("+tIndex+");' class='btn btn-primary'  >删除</button> "
		    }
		});
 		$table.bootstrapTable({data: $table.bootstrapTable('getData')});
	} 

	function afterSelectClick(obj,index) {
		
		if (index==null) {
			
			index=0;
		}
		//更新table data
		//$table.bootstrapTable({data: $table.bootstrapTable('getData')}); 
		
		//$table.bootstrapTable('getOptions').data.splice(index, 1, row);
        var id = $('#' + obj.id).select2("data")[0].id;
    		$.getJSON(baseURL+'generator/course/queryCourseDetail?classno=' + encodeURI(id), function (data) {
    			
              $table.bootstrapTable('updateRow', {
                  index: index,
                  row: {
                	  		classid: "<select class='form-control input-sm' name='classlist' id='class_"+index+"' style='width:150px;height:25px;' onclick='codeSelect(this);' onchange='afterSelectClick(this,"+index+");'><option value='' selected='selected'>"+data.coursename+"</option></select>",
      					gradeid: data.gradename,
    		        			schoolid: data.schoolname
                  }
              });

     	});
	}
	function delRow(index) {
		if (index<=0) {			
			index=0;
		}

        $table.bootstrapTable('removeByUniqueId', index);

	}
	
	function saveClick() {
		
		
	}
	
</script>
</html>